package com.api.common.domain.model;

import com.alibaba.fastjson2.JSONObject;
import com.api.common.core.domain.BaseEntity;
import lombok.Getter;
import lombok.Setter;

import java.util.Date;

@Getter
@Setter
public class RuleLatestDataQuery extends BaseEntity {
    private String key;
    private String value;
    private Date updateTime;

    public RuleLatestDataQuery(String key, String value, Date updateTime) {
        this.key = key;
        this.value = value;
        this.updateTime = updateTime;
    }

    public JSONObject toJSON() {
        JSONObject jo = new JSONObject();
        jo.put("key", this.key);
        jo.put("value", this.value);
        jo.put("updateTime", this.updateTime);
        return jo;
    }
}
